package com.qr.product.service;

import com.qr.product.mapper.ProductMapper;
import com.qr.product.pojo.Product;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ProductService {
    @Autowired
    private ProductMapper productMapper;

    public Product findById(Integer id){
        return productMapper.selectById(id);
    }

    public int save(Product product){
        int insert = productMapper.insert(product);
        return insert;
    }

}
